home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c7.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  22.4 KB  |  824 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. void r321clear_all(T321* C){
  10. T0* _value=NULL;
  11. /*[IRF3.6set_all_with*/{T321* C1=C;
  12. T0* b1=_value;
  13. r778set_all_with((((T321*)C1))->_storage/*4*/,b1,(((T321*)C1))->_upper/*12*/);
  14. }/*]*/
  15. }
  16. /*No:FIXED_ARRAY[RUN_FEATURE].set_all_with*/
  17. void r321make(T321* C,int a1){
  18. /*IF*/if ((a1)==(0)) {
  19. C->_upper=-(1);
  20. }
  21.  else if (((((T321*)C))->_capacity/*8*/)==(0)) {
  22. C->_storage=calloc(a1,sizeof(T0*));
  23. C->_capacity=a1;
  24. C->_upper=(a1)-(1);
  25. }
  26.  else if (((((T321*)C))->_capacity/*8*/)<(a1)) {
  27. C->_storage=calloc(a1,sizeof(T0*));
  28. C->_capacity=a1;
  29. C->_upper=(a1)-(1);
  30. }
  31. else {
  32. C->_upper=(a1)-(1);
  33. r321clear_all(C);
  34. }
  35. /*FI*/}
  36. int r321fast_has(T321* C,T0* a1){
  37. int R=0;
  38. /*IF*/if ((r321count(C))>(0)) {
  39. R=(r321fast_index_of(C,a1))<=((((T321*)C))->_upper/*12*/);
  40. }
  41. /*FI*/return R;
  42. }
  43. T0* r321item(T321* C,int a1){
  44. T0* R=NULL;
  45. R=((((T321*)C))->_storage/*4*/)[a1];
  46. return R;
  47. }
  48. void r321resize(T321* C,int a1){
  49. T0* _elt_default=NULL;
  50. int _i=0;
  51. int _new_capacity=0;
  52. /*IF*/if ((a1)<=(r321count(C))) {
  53. C->_upper=(a1)-(1);
  54. }
  55. else {
  56. _new_capacity=a1;
  57. /*IF*/if (((((T321*)C))->_capacity/*8*/)<(_new_capacity)) {
  58. /*IF*/if (((((T321*)C))->_capacity/*8*/)==(0)) {
  59. C->_storage=calloc(_new_capacity,sizeof(T0*));
  60. }
  61. else {
  62. C->_storage=r778realloc((((T321*)C))->_storage/*4*/,(((T321*)C))->_capacity/*8*/,_new_capacity);
  63. }
  64. /*FI*/C->_capacity=_new_capacity;
  65. }
  66. /*FI*/_new_capacity=(((T321*)C))->_upper/*12*/;
  67. C->_upper=(a1)-(1);
  68. _i=(((T321*)C))->_upper/*12*/;
  69. while (!((_i)==(_new_capacity))) {
  70. /*[IRF3.6put*/{T321* C1=C;
  71. T0* b1=_elt_default;
  72. int b2=_i;
  73. ((((T321*)C1))->_storage/*4*/)[b2]=(b1);
  74. }/*]*/
  75. _i=(_i)-(1);
  76. }
  77. }
  78. /*FI*/}
  79. /*No:FIXED_ARRAY[RUN_FEATURE].storage*/
  80. /*No:FIXED_ARRAY[RUN_FEATURE].capacity*/
  81. void r321with_capacity(T321* C,int a1){
  82. /*IF*/if (((((T321*)C))->_capacity/*8*/)<(a1)) {
  83. C->_storage=calloc(a1,sizeof(T0*));
  84. C->_capacity=a1;
  85. }
  86. /*FI*/C->_upper=-(1);
  87. }
  88. int r321fast_index_of(T321* C,T0* a1){
  89. int R=0;
  90. R=r778fast_index_of((((T321*)C))->_storage/*4*/,a1,(((T321*)C))->_upper/*12*/);
  91. return R;
  92. }
  93. /*No:FIXED_ARRAY[RUN_FEATURE].put*/
  94. /*No:FIXED_ARRAY[RUN_FEATURE].upper*/
  95. void r321add_last(T321* C,T0* a1){
  96. int _new_capacity=0;
  97. /*IF*/if ((((((T321*)C))->_upper/*12*/)+(1))<=(((((T321*)C))->_capacity/*8*/)-(1))) {
  98. C->_upper=((((T321*)C))->_upper/*12*/)+(1);
  99. }
  100.  else if (((((T321*)C))->_capacity/*8*/)==(0)) {
  101. C->_storage=calloc(2,sizeof(T0*));
  102. C->_capacity=2;
  103. C->_upper=0;
  104. }
  105. else {
  106. _new_capacity=(2)*((((T321*)C))->_capacity/*8*/);
  107. C->_storage=r778realloc((((T321*)C))->_storage/*4*/,(((T321*)C))->_capacity/*8*/,_new_capacity);
  108. C->_capacity=_new_capacity;
  109. C->_upper=((((T321*)C))->_upper/*12*/)+(1);
  110. }
  111. /*FI*//*[IRF3.6put*/{T321* C1=C;
  112. T0* b1=a1;
  113. int b2=(((T321*)C))->_upper/*12*/;
  114. ((((T321*)C1))->_storage/*4*/)[b2]=(b1);
  115. }/*]*/
  116. }
  117. int r321count(T321* C){
  118. int R=0;
  119. R=((((T321*)C))->_upper/*12*/)+(1);
  120. return R;
  121. }
  122. /*No:ARRAY[LOCAL_NAME1].clear_all*/
  123. /*No:ARRAY[LOCAL_NAME1].set_all_with*/
  124. void r733make(T733* C,int a1,int a2){
  125. int _needed=0;
  126. C->_lower=a1;
  127. C->_upper=a2;
  128. _needed=((a2)-(a1))+(1);
  129. /*IF*/if ((_needed)>(0)) {
  130. /*IF*/if (((((T733*)C))->_capacity/*8*/)<(_needed)) {
  131. /*IF*/if (((((T733*)C))->_capacity/*8*/)==(0)) {
  132. C->_storage=calloc(_needed,sizeof(T0*));
  133. }
  134. else {
  135. C->_storage=calloc(_needed,sizeof(T0*));
  136. }
  137. /*FI*/C->_capacity=_needed;
  138. }
  139. else {
  140. /*[IRF3.6clear_all*/{T733* C1=C;
  141. T0* __value=NULL;
  142. /*[IRF3.6set_all_with*/{T733* C2=C1;
  143. T0* c1=__value;
  144. r731set_all_with((((T733*)C2))->_storage/*4*/,c1,((((T733*)C2))->_upper/*12*/)-((((T733*)C2))->_lower/*16*/));
  145. }/*]*/
  146. }/*]*/
  147. }
  148. /*FI*/}
  149. /*FI*/}
  150. T0* r733item(T733* C,int a1){
  151. T0* R=NULL;
  152. R=((((T733*)C))->_storage/*4*/)[(a1)-((((T733*)C))->_lower/*16*/)];
  153. return R;
  154. }
  155. /*No:ARRAY[LOCAL_NAME1].storage*/
  156. T0* r733twin(T733* C){
  157. T0* R=NULL;
  158. R=malloc(sizeof(*C));
  159. *((T733*)R)=M733;
  160. r733copy(((T733*)R),((T0*)C));
  161. return R;
  162. }
  163. /*No:ARRAY[LOCAL_NAME1].capacity*/
  164. void r733copy(T733* C,T0* a1){
  165. int _needed_capacity=0;
  166. C->_lower=(((T733*)((T733*)a1)))->_lower/*16*/;
  167. C->_upper=(((T733*)((T733*)a1)))->_upper/*12*/;
  168. _needed_capacity=(((((T733*)C))->_upper/*12*/)-((((T733*)C))->_lower/*16*/))+(1);
  169. /*IF*/if (((((T733*)C))->_capacity/*8*/)<(_needed_capacity)) {
  170. C->_capacity=_needed_capacity;
  171. C->_storage=calloc((((T733*)C))->_capacity/*8*/,sizeof(T0*));
  172. }
  173. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  174. r731copy_from((((T733*)C))->_storage/*4*/,(((T733*)((T733*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  175. }
  176. /*FI*/}
  177. /*No:ARRAY[LOCAL_NAME1].lower*/
  178. /*No:ARRAY[LOCAL_NAME1].put*/
  179. /*No:ARRAY[LOCAL_NAME1].upper*/
  180. int r733count(T733* C){
  181. int R=0;
  182. R=(((((T733*)C))->_upper/*12*/)-((((T733*)C))->_lower/*16*/))+(1);
  183. return R;
  184. }
  185. void r733add_last(T733* C,T0* a1){
  186. int _new_capacity=0;
  187. /*IF*/if (((((T733*)C))->_capacity/*8*/)<((r733count(C))+(1))) {
  188. /*IF*/if (((((T733*)C))->_capacity/*8*/)==(0)) {
  189. C->_capacity=16;
  190. C->_storage=calloc((((T733*)C))->_capacity/*8*/,sizeof(T0*));
  191. }
  192. else {
  193. _new_capacity=(2)*((((T733*)C))->_capacity/*8*/);
  194. C->_storage=r731realloc((((T733*)C))->_storage/*4*/,(((T733*)C))->_capacity/*8*/,_new_capacity);
  195. C->_capacity=_new_capacity;
  196. }
  197. /*FI*/}
  198. /*FI*/C->_upper=((((T733*)C))->_upper/*12*/)+(1);
  199. /*[IRF3.6put*/{T733* C1=C;
  200. T0* b1=a1;
  201. int b2=(((T733*)C))->_upper/*12*/;
  202. ((((T733*)C1))->_storage/*4*/)[(b2)-((((T733*)C1))->_lower/*16*/)]=(b1);
  203. }/*]*/
  204. }
  205. T0* r733first(T733* C){
  206. T0* R=NULL;
  207. R=r733item(C,(((T733*)C))->_lower/*16*/);
  208. return R;
  209. }
  210. T0* r247item(T247* C,int a1){
  211. T0* R=NULL;
  212. R=((((T247*)C))->_storage/*4*/)[(a1)-((((T247*)C))->_lower/*16*/)];
  213. return R;
  214. }
  215. /*No:ARRAY[WHEN_ITEM_1].storage*/
  216. T0* r247twin(T247* C){
  217. T0* R=NULL;
  218. R=malloc(sizeof(*C));
  219. *((T247*)R)=M247;
  220. r247copy(((T247*)R),((T0*)C));
  221. return R;
  222. }
  223. /*No:ARRAY[WHEN_ITEM_1].capacity*/
  224. void r247copy(T247* C,T0* a1){
  225. int _needed_capacity=0;
  226. C->_lower=(((T247*)((T247*)a1)))->_lower/*16*/;
  227. C->_upper=(((T247*)((T247*)a1)))->_upper/*12*/;
  228. _needed_capacity=(((((T247*)C))->_upper/*12*/)-((((T247*)C))->_lower/*16*/))+(1);
  229. /*IF*/if (((((T247*)C))->_capacity/*8*/)<(_needed_capacity)) {
  230. C->_capacity=_needed_capacity;
  231. C->_storage=calloc((((T247*)C))->_capacity/*8*/,sizeof(T0*));
  232. }
  233. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  234. r497copy_from((((T247*)C))->_storage/*4*/,(((T247*)((T247*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  235. }
  236. /*FI*/}
  237. /*No:ARRAY[WHEN_ITEM_1].lower*/
  238. /*No:ARRAY[WHEN_ITEM_1].put*/
  239. /*No:ARRAY[WHEN_ITEM_1].upper*/
  240. int r247count(T247* C){
  241. int R=0;
  242. R=(((((T247*)C))->_upper/*12*/)-((((T247*)C))->_lower/*16*/))+(1);
  243. return R;
  244. }
  245. void r247add_last(T247* C,T0* a1){
  246. int _new_capacity=0;
  247. /*IF*/if (((((T247*)C))->_capacity/*8*/)<((r247count(C))+(1))) {
  248. /*IF*/if (((((T247*)C))->_capacity/*8*/)==(0)) {
  249. C->_capacity=16;
  250. C->_storage=calloc((((T247*)C))->_capacity/*8*/,sizeof(T0*));
  251. }
  252. else {
  253. _new_capacity=(2)*((((T247*)C))->_capacity/*8*/);
  254. C->_storage=r497realloc((((T247*)C))->_storage/*4*/,(((T247*)C))->_capacity/*8*/,_new_capacity);
  255. C->_capacity=_new_capacity;
  256. }
  257. /*FI*/}
  258. /*FI*/C->_upper=((((T247*)C))->_upper/*12*/)+(1);
  259. /*[IRF3.6put*/{T247* C1=C;
  260. T0* b1=a1;
  261. int b2=(((T247*)C))->_upper/*12*/;
  262. ((((T247*)C1))->_storage/*4*/)[(b2)-((((T247*)C1))->_lower/*16*/)]=(b1);
  263. }/*]*/
  264. }
  265. T0* r948item(T948* C,int a1){
  266. T0* R=NULL;
  267. R=((((T948*)C))->_storage/*0*/)[(a1)-((((T948*)C))->_lower/*12*/)];
  268. return R;
  269. }
  270. /*No:ARRAY[IFTHEN].storage*/
  271. T0* r948twin(T948* C){
  272. T0* R=NULL;
  273. R=malloc(sizeof(*C));
  274. *((T948*)R)=M948;
  275. r948copy(((T948*)R),((T0*)C));
  276. return R;
  277. }
  278. /*No:ARRAY[IFTHEN].capacity*/
  279. void r948copy(T948* C,T0* a1){
  280. int _needed_capacity=0;
  281. C->_lower=(((T948*)((T948*)a1)))->_lower/*12*/;
  282. C->_upper=(((T948*)((T948*)a1)))->_upper/*8*/;
  283. _needed_capacity=(((((T948*)C))->_upper/*8*/)-((((T948*)C))->_lower/*12*/))+(1);
  284. /*IF*/if (((((T948*)C))->_capacity/*4*/)<(_needed_capacity)) {
  285. C->_capacity=_needed_capacity;
  286. C->_storage=calloc((((T948*)C))->_capacity/*4*/,sizeof(T0*));
  287. }
  288. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  289. r191copy_from((((T948*)C))->_storage/*0*/,(((T948*)((T948*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  290. }
  291. /*FI*/}
  292. /*No:ARRAY[IFTHEN].lower*/
  293. /*No:ARRAY[IFTHEN].put*/
  294. /*No:ARRAY[IFTHEN].upper*/
  295. int r948count(T948* C){
  296. int R=0;
  297. R=(((((T948*)C))->_upper/*8*/)-((((T948*)C))->_lower/*12*/))+(1);
  298. return R;
  299. }
  300. void r948add_last(T948* C,T0* a1){
  301. int _new_capacity=0;
  302. /*IF*/if (((((T948*)C))->_capacity/*4*/)<((r948count(C))+(1))) {
  303. /*IF*/if (((((T948*)C))->_capacity/*4*/)==(0)) {
  304. C->_capacity=16;
  305. C->_storage=calloc((((T948*)C))->_capacity/*4*/,sizeof(T0*));
  306. }
  307. else {
  308. _new_capacity=(2)*((((T948*)C))->_capacity/*4*/);
  309. C->_storage=r191realloc((((T948*)C))->_storage/*0*/,(((T948*)C))->_capacity/*4*/,_new_capacity);
  310. C->_capacity=_new_capacity;
  311. }
  312. /*FI*/}
  313. /*FI*/C->_upper=((((T948*)C))->_upper/*8*/)+(1);
  314. /*[IRF3.6put*/{T948* C1=C;
  315. T0* b1=a1;
  316. int b2=(((T948*)C))->_upper/*8*/;
  317. ((((T948*)C1))->_storage/*0*/)[(b2)-((((T948*)C1))->_lower/*12*/)]=(b1);
  318. }/*]*/
  319. }
  320. /*No:ARRAY[RUN_FEATURE_2].clear_all*/
  321. /*No:ARRAY[RUN_FEATURE_2].set_all_with*/
  322. void r280force(T280* C,T0* a1,int a2){
  323. /*IF*/if (((((T280*)C))->_upper/*12*/)<(a2)) {
  324. r280resize(C,(((T280*)C))->_lower/*16*/,a2);
  325. }
  326.  else if ((a2)<((((T280*)C))->_lower/*16*/)) {
  327. r280resize(C,a2,(((T280*)C))->_upper/*12*/);
  328. }
  329. /*FI*//*[IRF3.6put*/{T280* C1=C;
  330. T0* b1=a1;
  331. int b2=a2;
  332. ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
  333. }/*]*/
  334. }
  335. void r280make(T280* C,int a1,int a2){
  336. int _needed=0;
  337. C->_lower=a1;
  338. C->_upper=a2;
  339. _needed=((a2)-(a1))+(1);
  340. /*IF*/if ((_needed)>(0)) {
  341. /*IF*/if (((((T280*)C))->_capacity/*8*/)<(_needed)) {
  342. /*IF*/if (((((T280*)C))->_capacity/*8*/)==(0)) {
  343. C->_storage=calloc(_needed,sizeof(T0*));
  344. }
  345. else {
  346. C->_storage=calloc(_needed,sizeof(T0*));
  347. }
  348. /*FI*/C->_capacity=_needed;
  349. }
  350. else {
  351. /*[IRF3.6clear_all*/{T280* C1=C;
  352. T0* __value=NULL;
  353. /*[IRF3.6set_all_with*/{T280* C2=C1;
  354. T0* c1=__value;
  355. r579set_all_with((((T280*)C2))->_storage/*4*/,c1,((((T280*)C2))->_upper/*12*/)-((((T280*)C2))->_lower/*16*/));
  356. }/*]*/
  357. }/*]*/
  358. }
  359. /*FI*/}
  360. /*FI*/}
  361. T0* r280item(T280* C,int a1){
  362. T0* R=NULL;
  363. R=((((T280*)C))->_storage/*4*/)[(a1)-((((T280*)C))->_lower/*16*/)];
  364. return R;
  365. }
  366. void r280resize(T280* C,int a1,int a2){
  367. int _mem=0;
  368. int _up=0;
  369. int _i=0;
  370. T0* _other=NULL;
  371. {T280*n=malloc(sizeof(*n));
  372. *n=M280;
  373. r280make(n,a1,a2);
  374. _other=(T0*)n;
  375. }
  376. _i=r2max((((T280*)C))->_lower/*16*/,(((T280*)((T280*)_other)))->_lower/*16*/);
  377. _up=r2min((((T280*)C))->_upper/*12*/,(((T280*)((T280*)_other)))->_upper/*12*/);
  378. while (!((_i)>(_up))) {
  379. /*[IRF3.6put*/{T280* C1=((T280*)_other);
  380. T0* b1=r280item(C,_i);
  381. int b2=_i;
  382. ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
  383. }/*]*/
  384. _i=(_i)+(1);
  385. }
  386. *((T280*)(C))=*((T280*)(_other));
  387. }
  388. /*No:ARRAY[RUN_FEATURE_2].storage*/
  389. void r280swap(T280* C,int a1,int a2){
  390. T0* _tmp=NULL;
  391. _tmp=r280item(C,a1);
  392. /*[IRF3.6put*/{T280* C1=C;
  393. T0* b1=r280item(C,a2);
  394. int b2=a1;
  395. ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
  396. }/*]*/
  397. /*[IRF3.6put*/{T280* C1=C;
  398. T0* b1=_tmp;
  399. int b2=a2;
  400. ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
  401. }/*]*/
  402. }
  403. /*No:ARRAY[RUN_FEATURE_2].capacity*/
  404. /*No:ARRAY[RUN_FEATURE_2].lower*/
  405. /*No:ARRAY[RUN_FEATURE_2].put*/
  406. /*No:ARRAY[RUN_FEATURE_2].upper*/
  407. int r280count(T280* C){
  408. int R=0;
  409. R=(((((T280*)C))->_upper/*12*/)-((((T280*)C))->_lower/*16*/))+(1);
  410. return R;
  411. }
  412. void r280add_last(T280* C,T0* a1){
  413. int _new_capacity=0;
  414. /*IF*/if (((((T280*)C))->_capacity/*8*/)<((r280count(C))+(1))) {
  415. /*IF*/if (((((T280*)C))->_capacity/*8*/)==(0)) {
  416. C->_capacity=16;
  417. C->_storage=calloc((((T280*)C))->_capacity/*8*/,sizeof(T0*));
  418. }
  419. else {
  420. _new_capacity=(2)*((((T280*)C))->_capacity/*8*/);
  421. C->_storage=r579realloc((((T280*)C))->_storage/*4*/,(((T280*)C))->_capacity/*8*/,_new_capacity);
  422. C->_capacity=_new_capacity;
  423. }
  424. /*FI*/}
  425. /*FI*/C->_upper=((((T280*)C))->_upper/*12*/)+(1);
  426. /*[IRF3.6put*/{T280* C1=C;
  427. T0* b1=a1;
  428. int b2=(((T280*)C))->_upper/*12*/;
  429. ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
  430. }/*]*/
  431. }
  432. /*No:ARRAY[ARGUMENT_NAME1].clear_all*/
  433. /*No:ARRAY[ARGUMENT_NAME1].set_all_with*/
  434. void r65make(T65* C,int a1,int a2){
  435. int _needed=0;
  436. C->_lower=a1;
  437. C->_upper=a2;
  438. _needed=((a2)-(a1))+(1);
  439. /*IF*/if ((_needed)>(0)) {
  440. /*IF*/if (((((T65*)C))->_capacity/*8*/)<(_needed)) {
  441. /*IF*/if (((((T65*)C))->_capacity/*8*/)==(0)) {
  442. C->_storage=calloc(_needed,sizeof(T0*));
  443. }
  444. else {
  445. C->_storage=calloc(_needed,sizeof(T0*));
  446. }
  447. /*FI*/C->_capacity=_needed;
  448. }
  449. else {
  450. /*[IRF3.6clear_all*/{T65* C1=C;
  451. T0* __value=NULL;
  452. /*[IRF3.6set_all_with*/{T65* C2=C1;
  453. T0* c1=__value;
  454. r24set_all_with((((T65*)C2))->_storage/*4*/,c1,((((T65*)C2))->_upper/*12*/)-((((T65*)C2))->_lower/*16*/));
  455. }/*]*/
  456. }/*]*/
  457. }
  458. /*FI*/}
  459. /*FI*/}
  460. T0* r65item(T65* C,int a1){
  461. T0* R=NULL;
  462. R=((((T65*)C))->_storage/*4*/)[(a1)-((((T65*)C))->_lower/*16*/)];
  463. return R;
  464. }
  465. /*No:ARRAY[ARGUMENT_NAME1].storage*/
  466. T0* r65twin(T65* C){
  467. T0* R=NULL;
  468. R=malloc(sizeof(*C));
  469. *((T65*)R)=M65;
  470. r65copy(((T65*)R),((T0*)C));
  471. return R;
  472. }
  473. /*No:ARRAY[ARGUMENT_NAME1].capacity*/
  474. void r65copy(T65* C,T0* a1){
  475. int _needed_capacity=0;
  476. C->_lower=(((T65*)((T65*)a1)))->_lower/*16*/;
  477. C->_upper=(((T65*)((T65*)a1)))->_upper/*12*/;
  478. _needed_capacity=(((((T65*)C))->_upper/*12*/)-((((T65*)C))->_lower/*16*/))+(1);
  479. /*IF*/if (((((T65*)C))->_capacity/*8*/)<(_needed_capacity)) {
  480. C->_capacity=_needed_capacity;
  481. C->_storage=calloc((((T65*)C))->_capacity/*8*/,sizeof(T0*));
  482. }
  483. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  484. r24copy_from((((T65*)C))->_storage/*4*/,(((T65*)((T65*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  485. }
  486. /*FI*/}
  487. /*No:ARRAY[ARGUMENT_NAME1].lower*/
  488. /*No:ARRAY[ARGUMENT_NAME1].put*/
  489. /*No:ARRAY[ARGUMENT_NAME1].upper*/
  490. int r65count(T65* C){
  491. int R=0;
  492. R=(((((T65*)C))->_upper/*12*/)-((((T65*)C))->_lower/*16*/))+(1);
  493. return R;
  494. }
  495. void r65add_last(T65* C,T0* a1){
  496. int _new_capacity=0;
  497. /*IF*/if (((((T65*)C))->_capacity/*8*/)<((r65count(C))+(1))) {
  498. /*IF*/if (((((T65*)C))->_capacity/*8*/)==(0)) {
  499. C->_capacity=16;
  500. C->_storage=calloc((((T65*)C))->_capacity/*8*/,sizeof(T0*));
  501. }
  502. else {
  503. _new_capacity=(2)*((((T65*)C))->_capacity/*8*/);
  504. C->_storage=r24realloc((((T65*)C))->_storage/*4*/,(((T65*)C))->_capacity/*8*/,_new_capacity);
  505. C->_capacity=_new_capacity;
  506. }
  507. /*FI*/}
  508. /*FI*/C->_upper=((((T65*)C))->_upper/*12*/)+(1);
  509. /*[IRF3.6put*/{T65* C1=C;
  510. T0* b1=a1;
  511. int b2=(((T65*)C))->_upper/*12*/;
  512. ((((T65*)C1))->_storage/*4*/)[(b2)-((((T65*)C1))->_lower/*16*/)]=(b1);
  513. }/*]*/
  514. }
  515. T0* r65first(T65* C){
  516. T0* R=NULL;
  517. R=r65item(C,(((T65*)C))->_lower/*16*/);
  518. return R;
  519. }
  520. /*No:ARRAY[E_FEATURE].clear_all*/
  521. /*No:ARRAY[E_FEATURE].set_all_with*/
  522. void r495make(T495* C,int a1,int a2){
  523. int _needed=0;
  524. C->_lower=a1;
  525. C->_upper=a2;
  526. _needed=((a2)-(a1))+(1);
  527. /*IF*/if ((_needed)>(0)) {
  528. /*IF*/if (((((T495*)C))->_capacity/*4*/)<(_needed)) {
  529. /*IF*/if (((((T495*)C))->_capacity/*4*/)==(0)) {
  530. C->_storage=calloc(_needed,sizeof(T0*));
  531. }
  532. else {
  533. C->_storage=calloc(_needed,sizeof(T0*));
  534. }
  535. /*FI*/C->_capacity=_needed;
  536. }
  537. else {
  538. /*[IRF3.6clear_all*/{T495* C1=C;
  539. T0* __value=NULL;
  540. /*[IRF3.6set_all_with*/{T495* C2=C1;
  541. T0* c1=__value;
  542. r822set_all_with((((T495*)C2))->_storage/*0*/,c1,((((T495*)C2))->_upper/*8*/)-((((T495*)C2))->_lower/*12*/));
  543. }/*]*/
  544. }/*]*/
  545. }
  546. /*FI*/}
  547. /*FI*/}
  548. int r495fast_has(T495* C,T0* a1){
  549. int R=0;
  550. /*IF*/if ((r495count(C))>(0)) {
  551. R=(r495fast_index_of(C,a1))<=((((T495*)C))->_upper/*8*/);
  552. }
  553. /*FI*/return R;
  554. }
  555. T0* r495item(T495* C,int a1){
  556. T0* R=NULL;
  557. R=((((T495*)C))->_storage/*0*/)[(a1)-((((T495*)C))->_lower/*12*/)];
  558. return R;
  559. }
  560. void r495resize(T495* C,int a1,int a2){
  561. int _mem=0;
  562. int _up=0;
  563. int _i=0;
  564. T0* _other=NULL;
  565. {T495*n=malloc(sizeof(*n));
  566. *n=M495;
  567. r495make(n,a1,a2);
  568. _other=(T0*)n;
  569. }
  570. _i=r2max((((T495*)C))->_lower/*12*/,(((T495*)((T495*)_other)))->_lower/*12*/);
  571. _up=r2min((((T495*)C))->_upper/*8*/,(((T495*)((T495*)_other)))->_upper/*8*/);
  572. while (!((_i)>(_up))) {
  573. /*[IRF3.6put*/{T495* C1=((T495*)_other);
  574. T0* b1=r495item(C,_i);
  575. int b2=_i;
  576. ((((T495*)C1))->_storage/*0*/)[(b2)-((((T495*)C1))->_lower/*12*/)]=(b1);
  577. }/*]*/
  578. _i=(_i)+(1);
  579. }
  580. *((T495*)(C))=*((T495*)(_other));
  581. }
  582. /*No:ARRAY[E_FEATURE].storage*/
  583. /*No:ARRAY[E_FEATURE].capacity*/
  584. /*No:ARRAY[E_FEATURE].lower*/
  585. void r495with_capacity(T495* C,int a1,int a2){
  586. /*IF*/if (((((T495*)C))->_capacity/*4*/)<(a1)) {
  587. C->_storage=calloc(a1,sizeof(T0*));
  588. C->_capacity=a1;
  589. }
  590. /*FI*/C->_lower=a2;
  591. C->_upper=(a2)-(1);
  592. }
  593. int r495fast_index_of(T495* C,T0* a1){
  594. int R=0;
  595. R=((((T495*)C))->_lower/*12*/)+(r822fast_index_of((((T495*)C))->_storage/*0*/,a1,((((T495*)C))->_upper/*8*/)-((((T495*)C))->_lower/*12*/)));
  596. return R;
  597. }
  598. /*No:ARRAY[E_FEATURE].put*/
  599. /*No:ARRAY[E_FEATURE].upper*/
  600. void r495add_last(T495* C,T0* a1){
  601. int _new_capacity=0;
  602. /*IF*/if (((((T495*)C))->_capacity/*4*/)<((r495count(C))+(1))) {
  603. /*IF*/if (((((T495*)C))->_capacity/*4*/)==(0)) {
  604. C->_capacity=16;
  605. C->_storage=calloc((((T495*)C))->_capacity/*4*/,sizeof(T0*));
  606. }
  607. else {
  608. _new_capacity=(2)*((((T495*)C))->_capacity/*4*/);
  609. C->_storage=r822realloc((((T495*)C))->_storage/*0*/,(((T495*)C))->_capacity/*4*/,_new_capacity);
  610. C->_capacity=_new_capacity;
  611. }
  612. /*FI*/}
  613. /*FI*/C->_upper=((((T495*)C))->_upper/*8*/)+(1);
  614. /*[IRF3.6put*/{T495* C1=C;
  615. T0* b1=a1;
  616. int b2=(((T495*)C))->_upper/*8*/;
  617. ((((T495*)C1))->_storage/*0*/)[(b2)-((((T495*)C1))->_lower/*12*/)]=(b1);
  618. }/*]*/
  619. }
  620. int r495count(T495* C){
  621. int R=0;
  622. R=(((((T495*)C))->_upper/*8*/)-((((T495*)C))->_lower/*12*/))+(1);
  623. return R;
  624. }
  625. T0* r263item(T263* C,int a1){
  626. T0* R=NULL;
  627. R=((((T263*)C))->_storage/*4*/)[(a1)-((((T263*)C))->_lower/*16*/)];
  628. return R;
  629. }
  630. /*No:ARRAY[WHEN_ITEM_2].storage*/
  631. T0* r263twin(T263* C){
  632. T0* R=NULL;
  633. R=malloc(sizeof(*C));
  634. *((T263*)R)=M263;
  635. r263copy(((T263*)R),((T0*)C));
  636. return R;
  637. }
  638. /*No:ARRAY[WHEN_ITEM_2].capacity*/
  639. void r263copy(T263* C,T0* a1){
  640. int _needed_capacity=0;
  641. C->_lower=(((T263*)((T263*)a1)))->_lower/*16*/;
  642. C->_upper=(((T263*)((T263*)a1)))->_upper/*12*/;
  643. _needed_capacity=(((((T263*)C))->_upper/*12*/)-((((T263*)C))->_lower/*16*/))+(1);
  644. /*IF*/if (((((T263*)C))->_capacity/*8*/)<(_needed_capacity)) {
  645. C->_capacity=_needed_capacity;
  646. C->_storage=calloc((((T263*)C))->_capacity/*8*/,sizeof(T0*));
  647. }
  648. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  649. r533copy_from((((T263*)C))->_storage/*4*/,(((T263*)((T263*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  650. }
  651. /*FI*/}
  652. /*No:ARRAY[WHEN_ITEM_2].lower*/
  653. /*No:ARRAY[WHEN_ITEM_2].put*/
  654. /*No:ARRAY[WHEN_ITEM_2].upper*/
  655. int r263count(T263* C){
  656. int R=0;
  657. R=(((((T263*)C))->_upper/*12*/)-((((T263*)C))->_lower/*16*/))+(1);
  658. return R;
  659. }
  660. void r263add_last(T263* C,T0* a1){
  661. int _new_capacity=0;
  662. /*IF*/if (((((T263*)C))->_capacity/*8*/)<((r263count(C))+(1))) {
  663. /*IF*/if (((((T263*)C))->_capacity/*8*/)==(0)) {
  664. C->_capacity=16;
  665. C->_storage=calloc((((T263*)C))->_capacity/*8*/,sizeof(T0*));
  666. }
  667. else {
  668. _new_capacity=(2)*((((T263*)C))->_capacity/*8*/);
  669. C->_storage=r533realloc((((T263*)C))->_storage/*4*/,(((T263*)C))->_capacity/*8*/,_new_capacity);
  670. C->_capacity=_new_capacity;
  671. }
  672. /*FI*/}
  673. /*FI*/C->_upper=((((T263*)C))->_upper/*12*/)+(1);
  674. /*[IRF3.6put*/{T263* C1=C;
  675. T0* b1=a1;
  676. int b2=(((T263*)C))->_upper/*12*/;
  677. ((((T263*)C1))->_storage/*4*/)[(b2)-((((T263*)C1))->_lower/*16*/)]=(b1);
  678. }/*]*/
  679. }
  680. T0* r272item(T272* C,int a1){
  681. T0* R=NULL;
  682. R=((((T272*)C))->_storage/*4*/)[a1];
  683. return R;
  684. }
  685. /*No:FIXED_ARRAY[TYPE].storage*/
  686. /*No:FIXED_ARRAY[TYPE].capacity*/
  687. void r272with_capacity(T272* C,int a1){
  688. /*IF*/if (((((T272*)C))->_capacity/*8*/)<(a1)) {
  689. C->_storage=calloc(a1,sizeof(T0*));
  690. C->_capacity=a1;
  691. }
  692. /*FI*/C->_upper=-(1);
  693. }
  694. /*No:FIXED_ARRAY[TYPE].put*/
  695. /*No:FIXED_ARRAY[TYPE].upper*/
  696. void r272add_last(T272* C,T0* a1){
  697. int _new_capacity=0;
  698. /*IF*/if ((((((T272*)C))->_upper/*12*/)+(1))<=(((((T272*)C))->_capacity/*8*/)-(1))) {
  699. C->_upper=((((T272*)C))->_upper/*12*/)+(1);
  700. }
  701.  else if (((((T272*)C))->_capacity/*8*/)==(0)) {
  702. C->_storage=calloc(2,sizeof(T0*));
  703. C->_capacity=2;
  704. C->_upper=0;
  705. }
  706. else {
  707. _new_capacity=(2)*((((T272*)C))->_capacity/*8*/);
  708. C->_storage=r770realloc((((T272*)C))->_storage/*4*/,(((T272*)C))->_capacity/*8*/,_new_capacity);
  709. C->_capacity=_new_capacity;
  710. C->_upper=((((T272*)C))->_upper/*12*/)+(1);
  711. }
  712. /*FI*//*[IRF3.6put*/{T272* C1=C;
  713. T0* b1=a1;
  714. int b2=(((T272*)C))->_upper/*12*/;
  715. ((((T272*)C1))->_storage/*4*/)[b2]=(b1);
  716. }/*]*/
  717. }
  718. /*No:ARRAY[TYPE].clear_all*/
  719. /*No:ARRAY[TYPE].set_all_with*/
  720. void r701make(T701* C,int a1,int a2){
  721. int _needed=0;
  722. C->_lower=a1;
  723. C->_upper=a2;
  724. _needed=((a2)-(a1))+(1);
  725. /*IF*/if ((_needed)>(0)) {
  726. /*IF*/if (((((T701*)C))->_capacity/*4*/)<(_needed)) {
  727. /*IF*/if (((((T701*)C))->_capacity/*4*/)==(0)) {
  728. C->_storage=calloc(_needed,sizeof(T0*));
  729. }
  730. else {
  731. C->_storage=calloc(_needed,sizeof(T0*));
  732. }
  733. /*FI*/C->_capacity=_needed;
  734. }
  735. else {
  736. /*[IRF3.6clear_all*/{T701* C1=C;
  737. T0* __value=NULL;
  738. /*[IRF3.6set_all_with*/{T701* C2=C1;
  739. T0* c1=__value;
  740. r770set_all_with((((T701*)C2))->_storage/*0*/,c1,((((T701*)C2))->_upper/*8*/)-((((T701*)C2))->_lower/*12*/));
  741. }/*]*/
  742. }/*]*/
  743. }
  744. /*FI*/}
  745. /*FI*/}
  746. T0* r701item(T701* C,int a1){
  747. T0* R=NULL;
  748. R=((((T701*)C))->_storage/*0*/)[(a1)-((((T701*)C))->_lower/*12*/)];
  749. return R;
  750. }
  751. void r701resize(T701* C,int a1,int a2){
  752. int _mem=0;
  753. int _up=0;
  754. int _i=0;
  755. T0* _other=NULL;
  756. {T701*n=malloc(sizeof(*n));
  757. *n=M701;
  758. r701make(n,a1,a2);
  759. _other=(T0*)n;
  760. }
  761. _i=r2max((((T701*)C))->_lower/*12*/,(((T701*)((T701*)_other)))->_lower/*12*/);
  762. _up=r2min((((T701*)C))->_upper/*8*/,(((T701*)((T701*)_other)))->_upper/*8*/);
  763. while (!((_i)>(_up))) {
  764. /*[IRF3.6put*/{T701* C1=((T701*)_other);
  765. T0* b1=r701item(C,_i);
  766. int b2=_i;
  767. ((((T701*)C1))->_storage/*0*/)[(b2)-((((T701*)C1))->_lower/*12*/)]=(b1);
  768. }/*]*/
  769. _i=(_i)+(1);
  770. }
  771. *((T701*)(C))=*((T701*)(_other));
  772. }
  773. /*No:ARRAY[TYPE].storage*/
  774. T0* r701twin(T701* C){
  775. T0* R=NULL;
  776. R=malloc(sizeof(*C));
  777. *((T701*)R)=M701;
  778. r701copy(((T701*)R),((T0*)C));
  779. return R;
  780. }
  781. /*No:ARRAY[TYPE].capacity*/
  782. void r701copy(T701* C,T0* a1){
  783. int _needed_capacity=0;
  784. C->_lower=(((T701*)((T701*)a1)))->_lower/*12*/;
  785. C->_upper=(((T701*)((T701*)a1)))->_upper/*8*/;
  786. _needed_capacity=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
  787. /*IF*/if (((((T701*)C))->_capacity/*4*/)<(_needed_capacity)) {
  788. C->_capacity=_needed_capacity;
  789. C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
  790. }
  791. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  792. r770copy_from((((T701*)C))->_storage/*0*/,(((T701*)((T701*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  793. }
  794. /*FI*/}
  795. /*No:ARRAY[TYPE].lower*/
  796. /*No:ARRAY[TYPE].put*/
  797. /*No:ARRAY[TYPE].upper*/
  798. int r701count(T701* C){
  799. int R=0;
  800. R=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
  801. return R;
  802. }
  803. void r701add_last(T701* C,T0* a1){
  804. int _new_capacity=0;
  805. /*IF*/if (((((T701*)C))->_capacity/*4*/)<((r701count(C))+(1))) {
  806. /*IF*/if (((((T701*)C))->_capacity/*4*/)==(0)) {
  807. C->_capacity=16;
  808. C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
  809. }
  810. else {
  811. _new_capacity=(2)*((((T701*)C))->_capacity/*4*/);
  812. C->_storage=r770realloc((((T701*)C))->_storage/*0*/,(((T701*)C))->_capacity/*4*/,_new_capacity);
  813. C->_capacity=_new_capacity;
  814. }
  815. /*FI*/}
  816. /*FI*/C->_upper=((((T701*)C))->_upper/*8*/)+(1);
  817. /*[IRF3.6put*/{T701* C1=C;
  818. T0* b1=a1;
  819. int b2=(((T701*)C))->_upper/*8*/;
  820. ((((T701*)C1))->_storage/*0*/)[(b2)-((((T701*)C1))->_lower/*12*/)]=(b1);
  821. }/*]*/
  822. }
  823.  
  824.